package esmaltes.teste;

import javax.persistence.EntityManager;
import javax.persistence.EntityTransaction;

import esmaltes.model.Pais;
import esmaltes.util.JpaUtil;

public class TesteConectaBanco {

	public static void main(String[] args) {
		
		EntityManager manager = JpaUtil.getEntityManager();
		EntityTransaction trx = manager.getTransaction();
		
		trx.begin();

		Pais marca1 = new Pais();
		marca1.setDescricao("Teste");
		marca1.setAtivo(true);
		
		manager.persist(marca1);
		
		trx.commit();
		manager.close();
		
	}
	
}
